Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add connector props and format options in rw_catalog #19689

Merged
merged 11 commits into from
Dec 10, 2024

Conversation

tabVersion
Copy link
Contributor

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

resolve #19072

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@tabVersion
Copy link
Contributor Author

tabVersion commented Dec 5, 2024

for rw_catalog.rw_sources

id | name | schema_id | owner | connector |      columns      |      format       |    row_encode    | append_only | associated_table_id | connection_id |                                                                                             definition                                                                                             |              acl              |      initialized_at       |        created_at         |           initialized_at_cluster_version            |             created_at_cluster_version              | is_shared |                                                                                       connector_props                                                                                       |                          format_encode_options
----+------+-----------+-------+-----------+-------------------+-------------------+------------------+-------------+---------------------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+---------------------------+---------------------------+-----------------------------------------------------+-----------------------------------------------------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------
  7 | t    |         2 |     1 | KAFKA     | {bar,foo,_row_id} | FORMAT_TYPE_PLAIN | ENCODE_TYPE_AVRO | t           |                   6 |               | CREATE TABLE t () WITH (connector = 'kafka', properties.bootstrap.server = '127.0.0.1:9092', topic = 'avro_alter_table_test') FORMAT PLAIN ENCODE AVRO (schema.registry = 'http://127.0.0.1:8081') | {postgres=r/root,root=r/root} | 2024-12-05 07:54:35+00:00 | 2024-12-05 07:54:35+00:00 | PostgreSQL 13.14.0-RisingWave-2.2.0-alpha (unknown) | PostgreSQL 13.14.0-RisingWave-2.2.0-alpha (unknown) | f         | {"connector":{"type":"plaintext","value":"kafka"},"properties.bootstrap.server":{"type":"plaintext","value":"127.0.0.1:9092"},"topic":{"type":"plaintext","value":"avro_alter_table_test"}}  | {"schema.registry":{"type":"plaintext","value":"http://127.0.0.1:8081"}}
 12 | t1   |         2 |     1 | KAFKA     | {bar,foo,_row_id} | FORMAT_TYPE_PLAIN | ENCODE_TYPE_AVRO | t           |                  11 |               | CREATE TABLE t1 () WITH (connector = 'kafka', properties.bootstrap.server = secret secret_1, topic = 'avro_alter_table_test') FORMAT PLAIN ENCODE AVRO (schema.registry = 'http://127.0.0.1:8081') | {postgres=r/root,root=r/root} | 2024-12-05 08:00:40+00:00 | 2024-12-05 08:00:40+00:00 | PostgreSQL 13.14.0-RisingWave-2.2.0-alpha (unknown) | PostgreSQL 13.14.0-RisingWave-2.2.0-alpha (unknown) | f         | {"connector":{"type":"plaintext","value":"kafka"},"properties.bootstrap.server":{"type":"secret","value":{"value":"secret_1"}},"topic":{"type":"plaintext","value":"avro_alter_table_test"}} | {"schema.registry":{"type":"plaintext","value":"http://127.0.0.1:8081"}}
 15 | t2   |         2 |     1 | KAFKA     | {bar,foo,_row_id} | FORMAT_TYPE_PLAIN | ENCODE_TYPE_AVRO | t           |                  14 |            13 | CREATE TABLE t2 () WITH (connector = 'kafka', connection = connection conn, topic = 'avro_alter_table_test') FORMAT PLAIN ENCODE AVRO (schema.registry = 'http://127.0.0.1:8081')                  | {root=r/root,postgres=r/root} | 2024-12-05 08:24:52+00:00 | 2024-12-05 08:24:52+00:00 | PostgreSQL 13.14.0-RisingWave-2.2.0-alpha (unknown) | PostgreSQL 13.14.0-RisingWave-2.2.0-alpha (unknown) | f         | {"connector":{"type":"plaintext","value":"kafka"},"properties.bootstrap.server":{"type":"secret","value":{"value":"secret_1"}},"topic":{"type":"plaintext","value":"avro_alter_table_test"}} | {"schema.registry":{"type":"plaintext","value":"http://127.0.0.1:8081"}}
(3 rows)

for rw_catalog.rw_sinks

id |  name  | schema_id | owner | connector |          sink_type          | connection_id |                                                                                   definition                                                                                    |              acl              |      initialized_at       |        created_at         |           initialized_at_cluster_version            |             created_at_cluster_version              |                                                                                 connector_props                                                                                  |                                                      format_encode_options
----+--------+-----------+-------+-----------+-----------------------------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+---------------------------+---------------------------+-----------------------------------------------------+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------
 10 | sink_1 |         2 |     1 | KAFKA     | SINK_TYPE_FORCE_APPEND_ONLY |               | CREATE SINK sink_1 FROM t1 WITH (connector = 'kafka', properties.bootstrap.server = secret secret_1, topic = 'demo_sink') FORMAT PLAIN ENCODE JSON (force_append_only = 'true') | {root=r/root,postgres=r/root} | 2024-12-05 08:21:28+00:00 | 2024-12-05 08:21:29+00:00 | PostgreSQL 13.14.0-RisingWave-2.2.0-alpha (unknown) | PostgreSQL 13.14.0-RisingWave-2.2.0-alpha (unknown) | {"connector":{"type":"plaintext","value":"kafka"},"properties.bootstrap.server":{"type":"secret","value":{"value":"secret_1"}},"topic":{"type":"plaintext","value":"demo_sink"}} | {"force_append_only":{"type":"plaintext","value":"true"},"timestamptz.handling.mode":{"type":"plaintext","value":"utc_string"}}

tabversion added 2 commits December 5, 2024 16:05
@tabVersion tabVersion marked this pull request as ready for review December 5, 2024 08:26
Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

@tabVersion tabVersion enabled auto-merge December 10, 2024 11:16
@tabVersion tabVersion added this pull request to the merge queue Dec 10, 2024
Merged via the queue into main with commit 4545b6e Dec 10, 2024
28 of 29 checks passed
@tabVersion tabVersion deleted the tab/rw-conn-props branch December 10, 2024 13:22
@fuyufjh
Copy link
Member

fuyufjh commented Dec 18, 2024

Did it include authorization? i.e. Can I (non-root) see a source/table/sink created by other users?

@yezizp2012
Copy link
Member

Did it include authorization? i.e. Can I (non-root) see a source/table/sink created by other users?

No for most system catalogs for now. I will add uniformly. #19722

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(system table): add properties map(varchar,varchar) in rw_sources and rw_sinks
3 participants